server {
    listen 80;
    server_name betacat.io;
    rewrite  ^/(.*)$ http://wecron.betacat.io/$1 permanent;
}

server {
    listen 80;
    server_name wecron.betacat.io;

    charset     utf-8;
    client_max_body_size 50M;

    gzip on;
    gzip_disable msie6;
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 5;
    gzip_min_length 512;
    # Also for HTTP 1.0
    gzip_http_version 1.0;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

    location /static/ {
        alias {{ CODE_HOME }}/staticfiles/;
        expires max;
    }

    location /favicon.ico {
        root {{ CODE_HOME }}/staticfiles/;
        expires 1d;
    }

    location /sitemap.xml {
        root {{ CODE_HOME }}/staticfiles/;
        expires 1d;
    }

    location /robots.txt {
        root {{ CODE_HOME }}/staticfiles/;
        expires 1d;
    }

    location / {
        include uwsgi_params;
        uwsgi_pass unix:///tmp/wecron-uwsgi.sock;
    }

    location ~ \.php$ {
        deny all;
    }
}
